package com.ecloud.gardensterminal.controller.dto;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author Squbi
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class GardensDeviceDto {
    private Integer deviceId;
    private Integer deviceType;
    private Integer pageIndex;
    private Integer pageSize;

    public GardensDeviceDto(String json) {
        GardensDeviceDto dto = JSON.parseObject(json, this.getClass());
        this.deviceId = dto.deviceId;
        this.deviceType = dto.deviceType;
        this.pageIndex = dto.pageIndex;
        this.pageSize = dto.pageSize;
    }
}
